#ifndef WINDOWHEADER_H
#define WINDOWHEADER_H
#include <QWidget>
#include <QPoint>
#include <QRect>

//class WindowHeader is a header of its parent
class QPushButton;
namespace ExecTerminalImplNS
{
    class WindowHeader: public QWidget
    {
        Q_OBJECT
    public:
        WindowHeader(QWidget * parent);
        void setAdditionalCaption(const QString & str);

    protected slots:
        void minimizeWindow();
        void processExpandButton();

    protected:
        void paintEvent(QPaintEvent *);
        void resizeEvent(QResizeEvent *);
        void mousePressEvent(QMouseEvent *);
        void mouseMoveEvent(QMouseEvent *);
        void mouseDoubleClickEvent(QMouseEvent *);
        bool eventFilter(QObject *, QEvent *);

    protected:
        void layoutComponents();

    private:
        QString theAdditionalCaption;
        QRect theNormalGeometry;
        QPoint thePreviousMousePos;
        QPushButton * theMinimizeButton;
        QPushButton * theExpandButton;
        QPushButton * theCloseButton;
    };
}

#endif
